package StudyCode.summary.mydatetime;

import java.time.Year;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingYear {
	public static void main(String[] args) {
		Year y1 = Year.of(2012);
		Year y2 = y1.minusYears(1);
		Year y3 = y1.plusYears(1);
		Year y4 = Year.now();
		if (y1.isLeap()) {
			System.out.println(y1 + "是闰年.");
		} else {
			System.out.println(y1 + "不是闰年.");
		}
		System.out.println(y2);
		System.out.println(y3);
		System.out.println(y4);
	}
}
